package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.system.domain.dto.BanknoteSerialNumberRecordDto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 冠字号记录对象 banknote_serial_number_record
 * 
 * @author ruoyi
 * @date 2025-02-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BanknoteSerialNumberRecord implements Serializable {
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 0-龙钞 1-蛇钞 */
    @Excel(name = "类型", readConverterExp = "0=龙钞,1=蛇钞")
    private Integer billType;

    /** 冠字号 */
    @Excel(name = "冠字号")
    private String serialNumber;

    /** 0-单张 1-标十 2-标百 3-连续号 */
    @Excel(name = "类别", readConverterExp = "0=单张,1=标十,2=标百,3=连续号")
    private Long numberType;

    /** 0-裸 1-ACG 2-PMG 3-PCGS */
    @Excel(name = "评分", readConverterExp = "0=裸币,1=ACG,2=PMG,3=PCGS")
    private Long nakedOrGraded;

    /** 65 66 70 67 68 69 70 */
    @Excel(name = "得分")
    private String gradedScore;

    /** 创建人账号 */
    @Excel(name = "创建人账号")
    private String creatorAccount;

    /** 联系人微信号 */
    @Excel(name = "联系人微信号")
    private String contactWechatId;


    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /** 0-不是 1-是 */
//    @Excel(name = "0-不是 1-是")
    private Long isNiceNumber;

    /** 号码归属人账号 */
    @Excel(name = "号码归属人账号")
    private String numberOwnerAccount;


    private String otherOwner;

    private Integer otherBillType;

    private Long otherNumberType;

    private String otherGradedScore;

    private List<Long> ids;

//    @Excel(name = "配号时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date peiTime;

    private Long otherNakedOrGraded;

    public BanknoteSerialNumberRecord(BanknoteSerialNumberRecordDto banknoteSerialNumberRecordDto) {
        this.billType = banknoteSerialNumberRecordDto.getBillType();
        this.serialNumber = banknoteSerialNumberRecordDto.getSerialNumber();
        this.numberType = banknoteSerialNumberRecordDto.getNumberType();
        this.nakedOrGraded = banknoteSerialNumberRecordDto.getNakedOrGraded();
        this.gradedScore = banknoteSerialNumberRecordDto.getGradedScore();
        this.creatorAccount = banknoteSerialNumberRecordDto.getCreatorAccount();
        this.contactWechatId = banknoteSerialNumberRecordDto.getContactWechatId();
        this.createTime = banknoteSerialNumberRecordDto.getCreateTime();
        this.numberOwnerAccount = banknoteSerialNumberRecordDto.getNumberOwnerAccount();
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("billType", getBillType())
            .append("serialNumber", getSerialNumber())
            .append("numberType", getNumberType())
            .append("nakedOrGraded", getNakedOrGraded())
            .append("gradedScore", getGradedScore())
            .append("creatorAccount", getCreatorAccount())
            .append("createTime", getCreateTime())
            .append("contactWechatId", getContactWechatId())
            .append("isNiceNumber", getIsNiceNumber())
            .append("numberOwnerAccount", getNumberOwnerAccount())
            .toString();
    }
}
